home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Languages / Yerk 3.64 / Supplement / my stuff / fontnames < prev    next >
Text File  |  1990-12-31  |  426b  |  16 lines

  1.  
  2. int font#
  3. 0 variable fontName 32 allot
  4.  
  5. \ given a font number, returns name of font else null string
  6. : getFontName ( n -- addr len ) makeint fontName +base call getFontName
  7.     fontName count ;
  8.  
  9. : getfont# ( addr len -- n) str255 abs: font# call getFnum get: font# 
  10.     dup 0=
  11.     IF buf255 count swap +base swap >uc
  12.         get: font# getFontName swap +base swap >uc
  13.         buf255 count fontName count $=
  14.         IF ." not found" drop THEN 
  15.     THEN ;
  16.